package com.yuyang.wifi.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.yuyang.wifi.R;

import androidx.annotation.Nullable;


public class CheckSafeQuestionDialog extends CommonDialog {

    private TextView mDialogConfirm;
    private View mIvClose;
    private Context mContext;

    private String mTitle, mContent, mConfirmText, mCancelText;

    public static CheckSafeQuestionDialog newInstance() {
        CheckSafeQuestionDialog dialog = new CheckSafeQuestionDialog();
        Bundle data = new Bundle();
        dialog.setArguments(data);
        return dialog;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public int getLayoutId() {
        return R.layout.dialog_check_safe_question_layout;
    }

    @Override
    public void viewCreated(View view, @Nullable Bundle savedInstanceState) {
        mIvClose = (View) view.findViewById(R.id.rl_close_layout);
        mDialogConfirm = (TextView) view.findViewById(R.id.tv_fast_open);

        mDialogConfirm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
                if (mDialogListener != null) {
                    mDialogListener.onConfirm();
                }
            }
        });

        mIvClose.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }

    @Override
    public boolean isCancelable() {
        return true;
    }

    public void setData(Context context) {
        this.mContext = context;
    }

}
